<?php
class SagePaySettings {
	var $strConnectTo = "LIVE";    //Set to SIMULATOR for the Simulator expert system, TEST for the Test Server and LIVE in the live environment
	
	var $orderSuccessful = "";  
	var $orderFailed = "";  
	var $strVendorName = "mjsfashionltd";    /** Set this value to the Vendor Name assigned to you by Sage Pay or chosen when you applied **/
	var $strEncryptionPassword = "BQbr36giGuetmYZE"; // panel: user: moonjewellery password: ekDM62yxachpNXU    /** Set this value to the XOR Encryption password assigned to you by Sage Pay **/
	var $strCurrency = "GBP"; /** Set this to indicate the currency in which you wish to trade. You will need a merchant number in this currency **/
	var $strTransactionType = "PAYMENT"; /** This can be DEFERRED or AUTHENTICATE if your Sage Pay account supports those payment types **/
	var $strPartnerID = ""; /** Optional setting. If you are a Sage Pay Partner and wish to flag the transactions with your unique partner id set it here. **/
	
	/* Optional setting. 
	** 0 = Do not send either customer or vendor e-mails, 
	** 1 = Send customer and vendor e-mails if address(es) are provided(DEFAULT). 
	** 2 = Send Vendor Email but not Customer Email. If you do not supply this field, 1 is assumed and e-mails are sent if addresses are provided. **/
	var $bSendEMail = 1; 
	var $strVendorEMail = "marksoulsby@hotmail.com";    /** Optional setting. Set this to the mail address which will receive order confirmations and failures **/
	
	//** Encryption type should be left set to AES unless you are experiencing problems and have been told by SagePay support to change it - XOR is the only other acceptable value **
	var $strEncryptionType = "AES";
	
	/**************************************************************************************************
	* Global Definitions for this site
	**************************************************************************************************/
	
	var $strProtocol = "2.23";
	
	var $strPurchaseURL;
	

	
	function __construct(){
		if ($this->strConnectTo=="LIVE") 
			$this->strPurchaseURL="https://live.sagepay.com/gateway/service/vspform-register.vsp"; 
		elseif ($this->strConnectTo=="TEST")
			$this->strPurchaseURL="https://test.sagepay.com/gateway/service/vspform-register.vsp";
		else
			$this->strPurchaseURL="https://test.sagepay.com/simulator/vspformgateway.asp";	

		$this->orderSuccessful = "http://{$_SERVER['HTTP_HOST']}/sage_pay/payment/order_successful/";  
		$this->orderFailed = "http://{$_SERVER['HTTP_HOST']}/sage_pay/payment/order_failed/";  
	}
}